3.16 \(\int \frac{1}{(a+a \sin (x))^2} \, dx\)

Optimal. Leaf size=33 \[ -\frac{\cos (x)}{3 \left (a^2 \sin (x)+a^2\right )}-\frac{\cos (x)}{3 (a \sin (x)+a)^2} \]

[Out]

-Cos[x]/(3*(a + a*Sin[x])^2) - Cos[x]/(3*(a^2 + a^2*Sin[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0211535, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2650, 2648} \[ -\frac{\cos (x)}{3 \left (a^2 \sin (x)+a^2\right )}-\frac{\cos (x)}{3 (a \sin (x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[x])^(-2),x]

[Out]

-Cos[x]/(3*(a + a*Sin[x])^2) - Cos[x]/(3*(a^2 + a^2*Sin[x]))

Rule 2650

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*Cos[c + d*x]*(a + b*Sin[c + d*x])^n)/(a*
d*(2*n + 1)), x] + Dist[(n + 1)/(a*(2*n + 1)), Int[(a + b*Sin[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d},
 x] && EqQ[a^2 - b^2, 0] && LtQ[n, -1] && IntegerQ[2*n]

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin{align*} \int \frac{1}{(a+a \sin (x))^2} \, dx &=-\frac{\cos (x)}{3 (a+a \sin (x))^2}+\frac{\int \frac{1}{a+a \sin (x)} \, dx}{3 a}\\ &=-\frac{\cos (x)}{3 (a+a \sin (x))^2}-\frac{\cos (x)}{3 \left (a^2+a^2 \sin (x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.0277993, size = 31, normalized size = 0.94 \[ -\frac{-4 \sin (x)+\sin (2 x)+4 \cos (x)+\cos (2 x)-3}{6 a^2 (\sin (x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[x])^(-2),x]

[Out]

-(-3 + 4*Cos[x] + Cos[2*x] - 4*Sin[x] + Sin[2*x])/(6*a^2*(1 + Sin[x])^2)

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 35, normalized size = 1.1 \begin{align*} 2\,{\frac{1}{{a}^{2}} \left ( \left ( \tan \left ( x/2 \right ) +1 \right ) ^{-2}-2/3\, \left ( \tan \left ( x/2 \right ) +1 \right ) ^{-3}- \left ( \tan \left ( x/2 \right ) +1 \right ) ^{-1} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sin(x))^2,x)

[Out]

2/a^2*(1/(tan(1/2*x)+1)^2-2/3/(tan(1/2*x)+1)^3-1/(tan(1/2*x)+1))

________________________________________________________________________________________

Maxima [B]  time = 1.69752, size = 100, normalized size = 3.03 \begin{align*} -\frac{2 \,{\left (\frac{3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 2\right )}}{3 \,{\left (a^{2} + \frac{3 \, a^{2} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{3 \, a^{2} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{a^{2} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x))^2,x, algorithm="maxima")

[Out]

-2/3*(3*sin(x)/(cos(x) + 1) + 3*sin(x)^2/(cos(x) + 1)^2 + 2)/(a^2 + 3*a^2*sin(x)/(cos(x) + 1) + 3*a^2*sin(x)^2
/(cos(x) + 1)^2 + a^2*sin(x)^3/(cos(x) + 1)^3)

________________________________________________________________________________________

Fricas [A]  time = 1.33675, size = 161, normalized size = 4.88 \begin{align*} \frac{\cos \left (x\right )^{2} +{\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right ) + 2 \, \cos \left (x\right ) + 1}{3 \,{\left (a^{2} \cos \left (x\right )^{2} - a^{2} \cos \left (x\right ) - 2 \, a^{2} -{\left (a^{2} \cos \left (x\right ) + 2 \, a^{2}\right )} \sin \left (x\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x))^2,x, algorithm="fricas")

[Out]

1/3*(cos(x)^2 + (cos(x) - 1)*sin(x) + 2*cos(x) + 1)/(a^2*cos(x)^2 - a^2*cos(x) - 2*a^2 - (a^2*cos(x) + 2*a^2)*
sin(x))

________________________________________________________________________________________

Sympy [B]  time = 1.46067, size = 87, normalized size = 2.64 \begin{align*} \frac{2 \tan ^{3}{\left (\frac{x}{2} \right )}}{3 a^{2} \tan ^{3}{\left (\frac{x}{2} \right )} + 9 a^{2} \tan ^{2}{\left (\frac{x}{2} \right )} + 9 a^{2} \tan{\left (\frac{x}{2} \right )} + 3 a^{2}} - \frac{2}{3 a^{2} \tan ^{3}{\left (\frac{x}{2} \right )} + 9 a^{2} \tan ^{2}{\left (\frac{x}{2} \right )} + 9 a^{2} \tan{\left (\frac{x}{2} \right )} + 3 a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x))**2,x)

[Out]

2*tan(x/2)**3/(3*a**2*tan(x/2)**3 + 9*a**2*tan(x/2)**2 + 9*a**2*tan(x/2) + 3*a**2) - 2/(3*a**2*tan(x/2)**3 + 9
*a**2*tan(x/2)**2 + 9*a**2*tan(x/2) + 3*a**2)

________________________________________________________________________________________

Giac [A]  time = 1.72625, size = 39, normalized size = 1.18 \begin{align*} -\frac{2 \,{\left (3 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 3 \, \tan \left (\frac{1}{2} \, x\right ) + 2\right )}}{3 \, a^{2}{\left (\tan \left (\frac{1}{2} \, x\right ) + 1\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x))^2,x, algorithm="giac")

[Out]

-2/3*(3*tan(1/2*x)^2 + 3*tan(1/2*x) + 2)/(a^2*(tan(1/2*x) + 1)^3)